package vooga.behaviors;

import vooga.entities.Entity;
import vooga.geom.Vector;

/**
 * Make an Entity move once and then remove itself from Entity
 * @author congyiwu
 *
 */
public class MoveOnceBehavior extends AbstractBehavior {
	private Vector myVelocity;

	public MoveOnceBehavior(Vector velocity) {
		myVelocity = velocity;
	}

	public void step(Entity target) {
		target.translate(myVelocity.getXChange(), myVelocity.getYChange());
		target.removeBehavior(this);
	}
}
